package com.edu.edumanager.mapper;


import com.edu.edumanager.bean.EduVideo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;


import java.util.List;

/**
 * @program: edu-manager
 * @description:
 * @author: Jaime
 * @create: 2021-08-17 16:38
 **/
@Mapper
public interface EduVideoMapper {
    /**
     * 插入表video
     * @param video
     * @return
     */
    int addVideo(EduVideo video);

    List<EduVideo> findVideo(@Param("courseId") Integer courseId, @Param("chapterId") Integer chapterId);

    int deleteVideoByChapterId(Integer chapterId);

    int deleteVideoById(Integer videoId);

    EduVideo getVideo(Integer videoId);

    int updateVideo(EduVideo video);

    int deleteVideoByCourseId(Integer courseId);
}
